package com.itheima.eurekafeignclient.service;

import com.itheima.eurekafeignclient.entity.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.*;

@FeignClient(name="eureka-provider")
@Service
public interface FeignService {
        @GetMapping(value = "/hello")
        public String sayHello();

        @GetMapping(value = "/hello1")
        public String sayHello(@RequestParam String name);

        @GetMapping(value = "/hello2")
        public String sayHello(@RequestParam String username,@RequestHeader Integer age);

        //此方法有问题
        @PostMapping(value = "/hello3" )
        public String sayHello2( User user);

        @PostMapping(value = "/hello4" )
        public String sayHello(@RequestBody User user);
}
